{extend name="base/common"}

{block name="style"}
<link href="/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
<!-- Sweet Alert -->
<link href="/admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<style type="text/css">
	.form-horizontal .checkbox {
		min-height: 27px;
		margin-left: 20px;
	}

	.checkbox+.checkbox, .radio+.radio {
		margin-top: -5px;
		margin-left: 20px;
	}
	.modal-body1{
		padding: 20px 30px 30px 30px;
		height: 150px;
	}
</style>
{/block}

{block name="page-header"}
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-lg-10">
		<h2>权限管理</h2>
		<ol class="breadcrumb">
			<li>
				<a href="index.html">Auth</a>
			</li>
			<li class="active">
				<strong>User</strong>
			</li>
		</ol>
	</div>
	<div class="col-lg-2">

	</div>
</div>
{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-lg-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>组用户</h5>
					<div class="ibox-tools">

					</div>
				</div>
				<div class="ibox-content">
					<div class="table-responsive">
						<table class="table table-striped">
							<thead>
							<tr>
								<th><input class="i-checks check-all" type="checkbox"></th>
								<th>UID</th>
								<th>昵称</th>
								<th>积分</th>
								<th>登录次数</th>
								<th>最后登入时间 </th>
								<th>最后登入IP</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
							</thead>
							<tbody>
							{volist name="list" id="vo"}
							<tr>
								<td><input type="checkbox" class="i-checks ids" name="input[]"></td>
								<td>{$vo->member->id}</td>
								<td>{$vo->member->nickname}</td>
								<td>{$vo->member->score}</td>
								<td>{$vo->member->login}</td>
								<td><span>{$vo->member->last_login_time|time_format}</span></td>
								<td><span>{:long2ip($vo->member->last_login_ip)}</span></td>
								<td><span class="label label-info">{$vo->member->status}</span></td>
								<td>
									<a href="{:Url('Auth/removeFromGroup?uid='.$vo['uid'].'&group_id='.$vo['group_id'])}" class="ajax-get">解除授权</a>
								</td>
							</tr>
							{/volist}
							</tbody>
							<tfoot>
							<tr>
								<td colspan="10">
									<div class="page">{$_page}</div>
								</td>
							</tr>
							</tfoot>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}

{block name="script"}
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="/admin/js/plugins/sweetalert/sweetalert.min.js"></script>
<script>
$(function(){
	$('.i-checks').iCheck({
		checkboxClass: 'icheckbox_square-green',
		radioClass: 'iradio_square-green',
	});
	$(".check-all").on("ifChanged",function(){
		$("tbody").find(".ids").iCheck("toggle");
	});
});
</script>
{/block}